home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / PDReadInfo.z / PDReadInfo
Text File  |  1998-10-30  |  31KB  |  595 lines

  1.  
  2.  
  3.  
  4. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      PDReadInfo, PDLocalReadInfo, PDLocalWriteInfo - read/write the printer
  10.      configuration and status information
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ppppoooodddd....hhhh>>>>
  14.  
  15.      iiiinnnntttt PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr____nnnnaaaammmmeeee,,,, PPPPDDDDIIIInnnnffffooooSSSSttttrrrruuuucccctttt ********iiiinnnnffffoooopppp,,,,
  16.                     ttttiiiimmmmeeee____tttt ****mmmmoooodddd____ttttiiiimmmmeeeepppp))));;;;
  17.  
  18.      iiiinnnntttt PPPPDDDDLLLLooooccccaaaallllRRRReeeeaaaaddddIIIInnnnffffoooo((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr____nnnnaaaammmmeeee,,,,
  19.                          PPPPDDDDIIIInnnnffffooooSSSSttttrrrruuuucccctttt ********iiiinnnnffffoooopppp,,,, ttttiiiimmmmeeee____tttt ****mmmmoooodddd____ttttiiiimmmmeeeepppp))));;;;
  20.  
  21.      iiiinnnntttt PPPPDDDDLLLLooooccccaaaallllWWWWrrrriiiitttteeeeIIIInnnnffffoooo((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr____nnnnaaaammmmeeee,,,,
  22.                           PPPPDDDDIIIInnnnffffooooSSSSttttrrrruuuucccctttt ****iiiinnnnffffoooo))));;;;
  23.  
  24. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.      _P_D_R_e_a_d_I_n_f_o and _P_D_L_o_c_a_l_R_e_a_d_I_n_f_o fill a _P_D_I_n_f_o_S_t_r_u_c_t structure with the
  26.      current configuration and status information for the specified printer,
  27.      _p_r_i_n_t_e_r__n_a_m_e. _i_n_f_o_p is set to point to the newly filled structure.
  28.      _m_o_d__t_i_m_e_p is set to the time the printer information was last modified
  29.      (see _t_i_m_e(_2)). _P_D_R_e_a_d_I_n_f_o will read information from local and remote
  30.      printers.
  31.  
  32.      _P_D_L_o_c_a_l_W_r_i_t_e_I_n_f_o writes the specified _P_D_I_n_f_o_S_t_r_u_c_t structure to the
  33.      specified printer's configuration and status files. _i_n_f_o should point to
  34.      a filled in _P_D_I_n_f_o_S_t_r_u_c_t structure. If the _a_c_t_i_v_e__s_t_a_t_u_s field of the
  35.      _P_D_I_n_f_o_S_t_r_u_c_t is NNNNUUUULLLLLLLL, only the configuration file information will be
  36.      modified. In this case the _e_r_r_o_r__s_t_a_t_u_s field will be ignored.  This
  37.      function should only be used by administrative applications that need to
  38.      modify a local printer's configuration information (e.g. a printer
  39.      installation program). Printer drivers and application programs should
  40.      not modify the printer configuration information.
  41.  
  42.      Refer to the _l_i_b_p_o_d(_3) man page for more information about the "Local"
  43.      functions.
  44.  
  45.      The _P_D_I_n_f_o_S_t_r_u_c_t contains detailed information about a printer's
  46.      capabilities as well as its current operational status. The structure
  47.      does not contain log file information. The _P_D_I_n_f_o_S_t_r_u_c_t structure is
  48.      defined as follows.
  49.  
  50.           typedef struct _pdInfoStruct {
  51.               char  printer_class[PD_STR_MAX];     /* e.g. "PostScript", */
  52.                                                    /* "Color Raster", */
  53.                                                    /* "Plotter" */
  54.               char  printer_model[PD_STR_MAX];     /* e.g. "Phaser II SX" */
  55.               char  printer_options[PD_STR_MAX];   /* Option info */
  56.                                                    /* (e.g. "8 MB RAM") */
  57.               char  location_code[PD_STR_MAX];     /* Machine parsable, no */
  58.                                                    /* blanks, e.g. "3U-924" */
  59.               char  physical_location[PD_STR_MAX]; /* Human readable, e.g. */
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  71.  
  72.  
  73.  
  74.                                                   /* "Bldg. 3U, Room 924" */
  75.               char  technology[PD_STR_MAX];        /* e.g. "Ink Jet", */
  76.                                                    /* "Wax Transfer" */
  77.               char  config_path[PD_STR_MAX];       /* Path to config file */
  78.               char  driver_path[PD_STR_MAX};       /* Driver pathname */
  79.               char  port_path[PD_STR_MAX];         /* Device port pathname */
  80.               char  active_path[PD_STR_MAX];       /* Path to status file */
  81.               int   error_retry_wait;              /* Driver error retry */
  82.                                                    /* interval, seconds */
  83.               int   status_update_wait;            /* Status polling */
  84.                                                    /* interval, seconds */
  85.               int   media_wait;                    /* Manual feed wait */
  86.                                                    /* time, seconds */
  87.               int   horizontal_resolution;         /* Resolutions, dpi */
  88.               int   vertical_resolution;
  89.               float cost_per_page;                 /* Cost in local */
  90.                                                    /* currency e.g. 0.50 */
  91.               int   avg_time_per_page;             /* Times in seconds */
  92.               int   max_time_per_page;
  93.               int   min_number_of_colors;          /* No. of colors available*/
  94.               int   max_number_of_colors;
  95.               float min_area_horizontal;           /* Printable areas, in. */
  96.               float min_area_vertical;
  97.               float max_area_horizontal;
  98.               float max_area_vertical;
  99.               int   min_addr_horizontal;           /* Printable areas, dots */
  100.               int   min_addr_vertical;
  101.               int   max_addr_horizontal;
  102.               int   max_addr_vertical;
  103.               int   quality_modes;                 /* No. of quality modes */
  104.               char  **quality_mode_names;          /* Mode names */
  105.               int   default_quality_mode;          /* Default mode index */
  106.               int   manual_capable;                /* Manual feed capable, */
  107.                                                    /* 0 = no, 1 = yes */
  108.               int   black_substitute;              /* Substitute true black */
  109.                                                    /* for composite black, */
  110.                                                    /* 0 = no, 1 = yes */
  111.               int   media_standard;                /* Media measurement */
  112.                                                    /* standard, e.g. Metric */
  113.               int   avail_fonts;                   /* Number of fonts */
  114.               char  **avail_fonts_names;           /* Font names */
  115.               int   input_sources;                 /* No. of input sources */
  116.               char  **input_sources_names;         /* Input source names */
  117.               int   default_input_source;          /* Default input index */
  118.               float input_source_gamma;            /* Source gamma value */
  119.               int   color_adjustment;              /* Number of color */
  120.                                                    /* adjustment schemes */
  121.               char  **color_adj_names;             /* Color adj scheme names */
  122.               int   default_color_adj;             /* Default adj scheme */
  123.                                                    /* index */
  124.               int   media_types;                   /* Number of media types */
  125.               char  **media_types_names;           /* Media type names */
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  137.  
  138.  
  139.  
  140.               int   default_media_type;            /* Default media type */
  141.               int   size_table_entries;            /* Number of media size */
  142.                                                    /* table entries */
  143.               PDSizeTableStruct *size_table;       /* Media size table */
  144.               PDStatusStruct    *active_status;    /* Status information */
  145.               PDMessageStruct   *error_status;     /* Error, warning and */
  146.                                                    /* info messages */
  147.           } PDInfoStruct;
  148.  
  149.  
  150.      _p_r_i_n_t_e_r__c_l_a_s_s       Printer class string (e.g. "ColorPostScript",
  151.                          "Plotter").
  152.  
  153.      _p_r_i_n_t_e_r__m_o_d_e_l       Printer model name (e.g. "LaserWriter II NTX").
  154.  
  155.      _p_r_i_n_t_e_r__o_p_t_i_o_n_s     Installed printer options (e.g. "8 MByte RAM",
  156.                          "PostScript Cartridge").
  157.  
  158.      _l_o_c_a_t_i_o_n__c_o_d_e       Physical location of the printer in machine parsable
  159.                          format (e.g. "3U-924").
  160.  
  161.      _p_h_y_s_i_c_a_l__l_o_c_a_t_i_o_n   Physical location of the printer in human readable
  162.                          format (e.g. "Bldg. 3U, Room 924").
  163.  
  164.      _t_e_c_h_n_o_l_o_g_y          Printing technology (e.g. "Wax transfer", "Dye
  165.                          sublimation").
  166.  
  167.      _c_o_n_f_i_g__p_a_t_h         Complete pathname of configuration file. This is set
  168.                          to PPPPDDDDppppoooodddd____ppppaaaatttthhhh/[printer_name].config by _l_i_b_p_o_d.
  169.  
  170.      _d_r_i_v_e_r__p_a_t_h         Complete pathname of printer driver program (e.g.
  171.                          "/usr/lib/print/phandler").
  172.  
  173.      _p_o_r_t__p_a_t_h           Complete pathname of printer port device driver (e.g.
  174.                          "/dev/plp").
  175.  
  176.      _a_c_t_i_v_e__p_a_t_h         Complete pathname of status file. This is set by
  177.                          _l_i_b_p_o_d to be PPPPDDDDppppoooodddd____ppppaaaatttthhhh/[printer_name].status.
  178.  
  179.      _e_r_r_o_r__r_e_t_r_y__w_a_i_t    Number of seconds to wait before attempting to resume
  180.                          printing following an error.
  181.  
  182.      _s_t_a_t_u_s__u_p_d_a_t_e__w_a_i_t  Number of seconds between updates of the printer
  183.                          status file.
  184.  
  185.      _m_e_d_i_a__w_a_i_t          Number of seconds to wait for manual or print media
  186.                          changes.
  187.  
  188.      _h_o_r_i_z_o_n_t_a_l__r_e_s_o_l_u_t_i_o_n, _v_e_r_t_i_c_a_l__r_e_s_o_l_u_t_i_o_n
  189.                          Horizontal and vertical printer resolution in dots
  190.                          per inch (dpi).
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  203.  
  204.  
  205.  
  206.      _c_o_s_t__p_e_r__p_a_g_e       Cost per page in local currency (e.g. "0.50" for 50
  207.                          cents per page).
  208.  
  209.      _a_v_g__t_i_m_e__p_e_r__p_a_g_e, _m_a_x__t_i_m_e__p_e_r__p_a_g_e
  210.                          Average and maximum time to print a page in seconds.
  211.  
  212.      _m_i_n__n_u_m_b_e_r__o_f__c_o_l_o_r_s, _m_a_x__n_u_m_b_e_r__o_f__c_o_l_o_r_s
  213.                          Minimum and maximum number of colors available. A
  214.                          monochrome printer or printer ribbon would provide
  215.                          one available color. A CMY printer or ribbon would
  216.                          provide three colors. A CMYK printer or ribbon would
  217.                          provide four colors. Note that these fields should
  218.                          only contain the number of colors as opposed to the
  219.                          _n_u_m_b_e_r__o_f__c_o_l_o_r_s field in the _P_D_S_t_a_t_u_s_S_t_r_u_c_t which is
  220.                          used as a bitmask to specify the current number of
  221.                          colors as well as the colorspace, pixel depth and
  222.                          data format.
  223.  
  224.      _m_i_n__a_r_e_a__h_o_r_i_z_o_n_t_a_l, _m_i_n__a_r_e_a__v_e_r_t_i_c_a_l
  225.                          Minimum printable horizontal and vertical dimensions
  226.                          in inches.
  227.  
  228.      _m_a_x__a_r_e_a__h_o_r_i_z_o_n_t_a_l, _m_a_x__a_r_e_a__v_e_r_t_i_c_a_l
  229.                          Maximum printable horizontal and vertical dimensions
  230.                          in inches.
  231.  
  232.      _m_i_n__a_d_d_r__h_o_r_i_z_o_n_t_a_l, _m_i_n__a_d_d_r__v_e_r_t_i_c_a_l
  233.                          Minimum printable horizontal and vertical dimensions
  234.                          in dots.
  235.  
  236.      _m_a_x__a_d_d_r__h_o_r_i_z_o_n_t_a_l, _m_a_x__a_d_d_r__v_e_r_t_i_c_a_l
  237.                          Maximum printable horizontal and vertical dimensions
  238.                          in dots.
  239.  
  240.      _q_u_a_l_i_t_y__m_o_d_e_s       Number of printer quality modes.
  241.  
  242.      _q_u_a_l_i_t_y__m_o_d_e__n_a_m_e_s  Names of quality modes (e.g. "draft", "letter").
  243.  
  244.      _d_e_f_a_u_l_t__q_u_a_l_i_t_y__m_o_d_e
  245.                          The default quality mode expressed as an index into
  246.                          the list of quality mode names. Note that this value
  247.                          is based at one rather than zero. To use this value
  248.                          as an array index, subtract one from the value.
  249.  
  250.      _m_a_n_u_a_l__c_a_p_a_b_l_e      Boolean indicating whether the printer is (1) or is
  251.                          not (0) capable of manual feed.
  252.  
  253.      _b_l_a_c_k__s_u_b_s_t_i_t_u_t_e    Boolean indicating whether true black should (1) or
  254.                          should not (0) be substituted for composite black.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  269.  
  270.  
  271.  
  272.      _m_e_d_i_a__s_t_a_n_d_a_r_d      Code indicating paper measurement standard in use
  273.                          (see _p_o_d._h). The measurement standard is typically
  274.                          American or Metric.
  275.  
  276.      _a_v_a_i_l__f_o_n_t_s         Number of available fonts.
  277.  
  278.      _a_v_a_i_l__f_o_n_t_s__n_a_m_e_s   Names of available fonts (e.g. "Courier",
  279.                          "Helvetica").
  280.  
  281.      _i_n_p_u_t__s_o_u_r_c_e_s       Number of printer input sources.
  282.  
  283.      _i_n_p_u_t__s_o_u_r_c_e_s__n_a_m_e_s Names of possible printer input sources (e.g. "Sony
  284.                          16 inch Monitor").
  285.  
  286.      _d_e_f_a_u_l_t__i_n_p_u_t__s_o_u_r_c_e
  287.                          Default input source expressed as an index into the
  288.                          list of input source names. The input source is
  289.                          typically used for determining printer color
  290.                          correction. Note that this value is based at one
  291.                          rather than zero. To use this value as an array
  292.                          index, subtract one from the value.
  293.  
  294.      _i_n_p_u_t__s_o_u_r_c_e__g_a_m_m_a  Gamma value of the input source. This value is
  295.                          typically used in determining printer color
  296.                          correction.
  297.  
  298.      _c_o_l_o_r__a_d_j_u_s_t_m_e_n_t    Number of printer color correction schemes.
  299.  
  300.      _c_o_l_o_r__a_d_j__n_a_m_e_s     Names of available color correction schemes (e.g.
  301.                          "Improve Blue").
  302.  
  303.      _d_e_f_a_u_l_t__c_o_l_o_r__a_d_j   Default color correction scheme expressed as an index
  304.                          into the list of color correction names. Note that
  305.                          this value is based at one rather than zero.  To use
  306.                          this value as an array index, subtract one from the
  307.                          value.
  308.  
  309.      _m_e_d_i_a__t_y_p_e_s         Number of possible media types.
  310.  
  311.      _m_e_d_i_a__t_y_p_e_s__n_a_m_e_s   Names of possible media types (e.g. "Paper",
  312.                          "Transparency").
  313.  
  314.      _d_e_f_a_u_l_t__m_e_d_i_a__t_y_p_e  Default media type expressed as an index into the
  315.                          list of media type names. Note that this value is
  316.                          based at one rather than zero. To use this value as
  317.                          an array index one must be subtracted.
  318.  
  319.      _s_i_z_e__t_a_b_l_e__e_n_t_r_i_e_s  Number of entries in the print media size table.
  320.  
  321.      _s_i_z_e__t_a_b_l_e          An array of printer media size table entries. Each
  322.                          entry describes a single print medium in detail. See
  323.                          below for detailed information on this structure.
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  335.  
  336.  
  337.  
  338.      _a_c_t_i_v_e__s_t_a_t_u_s       Pointer to the printer status information structure.
  339.                          Refer to _P_D_R_e_a_d_S_t_a_t_u_s(_3) for detailed information on
  340.                          this structure.
  341.  
  342.      _e_r_r_o_r__s_t_a_t_u_s        Pointer to the printer message list. This is an array
  343.                          of printer error, warning and information messages.
  344.                          The number of messages in the array is given by the
  345.                          _e_r_r_o_r__c_o_u_n_t field of the _a_c_t_i_v_e__s_t_a_t_u_s structure.
  346.  
  347.      The _P_D_S_i_z_e_T_a_b_l_e_S_t_r_u_c_t is defined as follows.
  348.  
  349.           typedef struct _pdSizeTableStruct {
  350.               int   media_size;         /* Generic media name token */
  351.               int   horizontal_addr;    /* Horizontal dots */
  352.               int   vertical_addr;      /* Vertical dots */
  353.               float width;              /* Width in inches */
  354.               float length;             /* Length in inches */
  355.               float left_margin;        /* Left margin in inches */
  356.               float top_margin;         /* Top margin in inches */
  357.               char  raster_definition;  /* Raster direction and */
  358.                                         /* orientation bits */
  359.               char  validation_mask;    /* Entry validation */
  360.               char  variable_page_size; /* Reserved */
  361.           } PDSizeTableStruct;
  362.  
  363.  
  364.      _m_e_d_i_a__s_i_z_e          Media size code (see _p_o_d._h).
  365.  
  366.      _h_o_r_i_z_o_n_t_a_l__a_d_d_r, _v_e_r_t_i_c_a_l__a_d_d_r
  367.                          Number of horizontal and vertical dots. This is also
  368.                          the length of each raster line and the number of
  369.                          raster lines, respectively.
  370.  
  371.      _w_i_d_t_h               Width of the medium in inches along the raster line.
  372.  
  373.      _l_e_n_g_t_h              Length of the medium in inches perpendicular to the
  374.                          raster line.
  375.  
  376.      _l_e_f_t__m_a_r_g_i_n         Non-printable distance in inches to the left of each
  377.                          raster line.
  378.  
  379.      _t_o_p__m_a_r_g_i_n          Non-printable distance in inches before the first
  380.                          raster line.
  381.  
  382.      _r_a_s_t_e_r__d_e_f_i_n_i_t_i_o_n   Code describing the direction and orientation of the
  383.                          printer raster (see _p_o_d._h).
  384.  
  385.      _v_a_l_i_d_a_t_i_o_n__m_a_s_k     Size table entry validation mask. If _P_D_F_i_n_d_P_a_g_e_S_i_z_e
  386.                          is called with a size code of PPPPDDDD____SSSSIIIIZZZZEEEE____CCCCUUUURRRRRRRREEEENNNNTTTT,
  387.                          dimensional information for the currently loaded
  388.                          paper size will be returned. The mechanics of
  389.                          determining this information is as follows. The
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  401.  
  402.  
  403.  
  404.                          _m_e_d_i_a__s_i_z_e field of the _P_D_S_t_a_t_u_s_S_t_r_u_c_t is used as the
  405.                          size code to search the page table in the
  406.                          _P_D_I_n_f_o_S_t_r_u_c_t.  Dimensional information is returned
  407.                          for the page size entry that matches the _m_e_d_i_a__s_i_z_e
  408.                          value and whose validation masks satisfy the
  409.                          relationship (_s_t_a_t_u_s _m_a_s_k & _t_a_b_l_e _m_a_s_k) == _s_t_a_t_u_s
  410.                          _m_a_s_k.  The validation mask can be helpful in
  411.                          specifying page dimensions for printers that support
  412.                          multiple resolutions.  The page table can contain a
  413.                          number of page names that are identical but with
  414.                          dimensions appropriate to different resolutions. Each
  415.                          entry would have a unique validation mask. This way
  416.                          the status validation mask could be used to select
  417.                          the proper page size for the current output
  418.                          resolution.
  419.  
  420.      _v_a_r_i_a_b_l_e__p_a_g_e__s_i_z_e  Reserved for future use. When writing the size table
  421.                          always set this field to 0.
  422.  
  423. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  424.      0 is returned if execution was successful. -1 is returned and _P_D_e_r_r_n_o is
  425.      set if an execution error has occurred.
  426.  
  427. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  428.      _P_D_R_e_a_d_I_n_f_o and _P_D_L_o_c_a_l_R_e_a_d_I_n_f_o will fail under the following
  429.      circumstances.
  430.  
  431.      PD_LIBERR_BAD_PNAME      A NULL or empty printer name string has been
  432.                               specified.
  433.  
  434.      PD_LIBERR_STATUS_READ    The status file could not be opened for reading
  435.                               or an error occurred while reading the file.
  436.  
  437.      PD_LIBERR_CONFIG_READ    The config file could not be opened for reading
  438.                               or an error occurred while reading the file.
  439.  
  440.      In addition, _P_D_R_e_a_d_I_n_f_o will fail under the following circumstances.
  441.  
  442.      PD_LIBERR_NO_PRINTER     The specified printer has not been registered
  443.                               with the printer spooling system and is,
  444.                               therefore, inaccessible.
  445.  
  446.      PD_LIBERR_BAD_HOSTNAME   The network address of the specified hostname
  447.                               could not be found.
  448.  
  449.      PD_LIBERR_NETWORK        For an unknown reason, a network connection
  450.                               could not be made with the remote printer host.
  451.  
  452.  
  453.      PD_LIBERR_NET_TIMEOUT    A timeout occurred while attempting to
  454.                               communicate with the remote printer host.
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  467.  
  468.  
  469.  
  470.      PD_LIBERR_NET_INTR       The program has been interrupted while
  471.                               attempting to communicate with the remote
  472.                               printer host.
  473.  
  474.      PD_LIBERR_NET_NOTREG     The podd daemon is not registered on the remote
  475.                               printer host.
  476.  
  477.      PD_LIBERR_NET_PMAP       The port mapper daemon failed on the remote
  478.                               printer host.
  479.  
  480.      PD_LIBERR_NET_NOPROC     The client has called a libpod function that is
  481.                               not supported by the podd daemon on the remote
  482.                               printer host.
  483.  
  484.      PD_LIBERR_NET_CLNTXDR    The libpod library XDR routines and the kernel's
  485.                               XDR routines are incompatible.
  486.  
  487.      PD_LIBERR_NET_SVCXDR     The podd daemon XDR routines and the remote
  488.                               printer host's kernel XDR routines are
  489.                               incompatible.
  490.  
  491.      PD_LIBERR_NET_RPCMATCH   The version of RPC software on the client is
  492.                               incompatible with the version on the remote
  493.                               printer host.
  494.  
  495.      PD_LIBERR_NET_PROCMATCH  The version of the specified libpod function on
  496.                               the client is incompatible with the version on
  497.                               the remote printer host.
  498.  
  499.      _P_D_W_r_i_t_e_I_n_f_o will fail under the following circumstances.
  500.  
  501.      PD_LIBERR_BAD_STRUCT     A NULL structure pointer has been specified.
  502.  
  503.      PD_LIBERR_BAD_PNAME      A NULL or empty printer name string has been
  504.                               specified.
  505.  
  506.      PD_LIBERR_CONFIG_WRITE   The config file could not be opened for writing
  507.                               or an error occurred while writing the file.
  508.  
  509.      PD_LIBERR_STATUS_WRITE   The status file could not be opened for writing
  510.                               or an error occurred while writing the file.
  511.  
  512.      PD_LIBERR_MAX_MESSAGE    A request has been made to write more than
  513.                               PPPPDDDD____MMMMEEEESSSSSSSSAAAAGGGGEEEE____MMMMAAAAXXXX messages to the status file.
  514.  
  515.      PD_LIBERR_BAD_MSGCNT     An invalid value has been specified for the
  516.                               number of messages to write to the status file.
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))                    IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                     PPPPDDDDRRRReeeeaaaaddddIIIInnnnffffoooo((((3333))))
  533.  
  534.  
  535.  
  536. WARNINGS
  537.      1.   Upon successful execution, the function sets _i_n_f_o_p to point to an
  538.           internal copy of the _P_D_I_n_f_o_S_t_r_u_c_t. The contents of this structure
  539.           can change after each _l_i_b_p_o_d function call. To preserve the contents
  540.           of the structure across _l_i_b_p_o_d calls, it should be copied into
  541.           user-allocated storage.
  542.  
  543.      2.   The function _P_D_R_e_a_d_I_n_f_o calls the _l_i_b_s_p_o_o_l function
  544.           _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o. This _l_i_b_s_p_o_o_l function is not reentrant. This
  545.           means that any pointer returned by a previous call to
  546.           _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o will be invalid after a call to _P_D_R_e_a_d_I_n_f_o.
  547.  
  548. NNNNOOOOTTTTEEEESSSS
  549.      1.   _P_D_R_e_a_d_I_n_f_o and _P_D_L_o_c_a_l_R_e_a_d_I_n_f_o obtain printer information from the
  550.           config and status POD files. _m_o_d__t_i_m_e_p is set to the modification
  551.           time of the file that has been most recently modified.
  552.  
  553.      2.   The _P_D_W_r_i_t_e_I_n_f_o function ignores the _c_o_n_f_i_g__p_a_t_h and _a_c_t_i_v_e__p_a_t_h
  554.           fields of the _P_D_I_n_f_o_S_t_r_u_c_t. The function automatically provides
  555.           pathname values for these fields.
  556.  
  557. FFFFIIIILLLLEEEESSSS
  558.      /var/spool/lp/pod/[printer name].config
  559.      /var/spool/lp/pod/[printer name].status
  560.  
  561. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  562.      PDReadStatus(3), libpod(3), time(2), ctime(3), podd(1M)
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.